﻿namespace HuaWei.Windows.Forms
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class frmMsgBox : Form
    {
        private Button btnExpandDetail;
        private Button btnOK;
        private bool flag;
        private IContainer icontainer = null;
        private PictureBox pictureBox1;
        private TextBox txtMessage;
        private RichTextBox txtMessageDetail;

        public frmMsgBox()
        {
            this.InitializeComponent();
        }

        private void btnExpandDetail_Click(object sender, EventArgs e)
        {
            this.flag = !this.flag;
            if (this.flag)
            {
                base.Height = 0x15d;
                this.btnExpandDetail.Text = "<<折叠详细";
            }
            else
            {
                base.Height = 0xaf;
                this.btnExpandDetail.Text = "查看详细>>";
            }
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            base.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.icontainer != null))
            {
                this.icontainer.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.btnExpandDetail = new System.Windows.Forms.Button();
            this.btnOK = new System.Windows.Forms.Button();
            this.txtMessageDetail = new System.Windows.Forms.RichTextBox();
            this.txtMessage = new System.Windows.Forms.TextBox();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.SuspendLayout();
            // 
            // pictureBox1
            // 
            this.pictureBox1.Image = global::Properties.Resources.pictureBox1_Image;
            this.pictureBox1.Location = new System.Drawing.Point(26, 24);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(43, 43);
            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
            this.pictureBox1.TabIndex = 1;
            this.pictureBox1.TabStop = false;
            // 
            // btnExpandDetail
            // 
            this.btnExpandDetail.Location = new System.Drawing.Point(15, 111);
            this.btnExpandDetail.Name = "btnExpandDetail";
            this.btnExpandDetail.Size = new System.Drawing.Size(89, 23);
            this.btnExpandDetail.TabIndex = 1;
            this.btnExpandDetail.Text = "查看详细>>";
            this.btnExpandDetail.UseVisualStyleBackColor = true;
            this.btnExpandDetail.Click += new System.EventHandler(this.btnExpandDetail_Click);
            // 
            // btnOK
            // 
            this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.btnOK.Location = new System.Drawing.Point(379, 111);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new System.Drawing.Size(75, 23);
            this.btnOK.TabIndex = 0;
            this.btnOK.Text = "确定";
            this.btnOK.UseVisualStyleBackColor = true;
            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
            // 
            // txtMessageDetail
            // 
            this.txtMessageDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
            | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.txtMessageDetail.BackColor = System.Drawing.Color.White;
            this.txtMessageDetail.Location = new System.Drawing.Point(12, 140);
            this.txtMessageDetail.Name = "txtMessageDetail";
            this.txtMessageDetail.ReadOnly = true;
            this.txtMessageDetail.Size = new System.Drawing.Size(444, 0);
            this.txtMessageDetail.TabIndex = 4;
            this.txtMessageDetail.Text = "";
            // 
            // txtMessage
            // 
            this.txtMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.txtMessage.BackColor = System.Drawing.SystemColors.Menu;
            this.txtMessage.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtMessage.Location = new System.Drawing.Point(95, 24);
            this.txtMessage.Multiline = true;
            this.txtMessage.Name = "txtMessage";
            this.txtMessage.ReadOnly = true;
            this.txtMessage.Size = new System.Drawing.Size(361, 62);
            this.txtMessage.TabIndex = 2;
            // 
            // frmMsgBox
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(468, 150);
            this.Controls.Add(this.txtMessage);
            this.Controls.Add(this.txtMessageDetail);
            this.Controls.Add(this.btnOK);
            this.Controls.Add(this.btnExpandDetail);
            this.Controls.Add(this.pictureBox1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "frmMsgBox";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "提示";
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        public string Message
        {
            get
            {
                return this.txtMessage.Text;
            }
            set
            {
                this.txtMessage.Text = value;
            }
        }

        public string MessageDetail
        {
            get
            {
                return this.txtMessageDetail.Text;
            }
            set
            {
                this.txtMessageDetail.Text = value;
            }
        }
    }
}

